#pragma once

#include "../_inc/def_interface.h"
#include "../_inc/TimeList.h"
#include "SortedArray.h"


class CListMgr
{
public:
	CListMgr(void);
	virtual ~CListMgr(void);

private:
	CSortedArray <CTimeList *, CTimeList *> m_arrRecList[MAX_REC_TYPE];
	CStringArray m_sarrText;

	void MergeSort();
	void LoadText();
protected:
	static UINT __stdcall _procSort(LPVOID lpParam);
	void procSort();
public:
	CSortedArray <CTimeList *, CTimeList *> *GetRecList(DWORD dwRecType)
	{
		return &m_arrRecList[dwRecType];
	}

	void ResetRecList();
	void InsertRecList(void *pItemTime);
	void SortRecList();

	CString GetRecTypeString(DWORD dwRecType);
	CString GetString(int nIdx);

	void RefreshLang();
};
